package com.ruoyi.common.core.mapper.order.vo;
import com.ruoyi.common.core.domain.order.vo.OrderDetailVo;
import com.ruoyi.common.core.domain.order.vo.TakeOrderSkills;
import com.ruoyi.common.core.domain.order.vo.TakeOrdersInfo;
import com.ruoyi.common.core.domain.order.vo.TakeOrdersService;
import com.ruoyi.common.core.domain.user.Address;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;


import java.util.List;

public interface TakeOrdersServiceMapper{
    /**
     * 1. 选择接单类型
     */
    List<TakeOrdersService> listServices();


    /**
     * 根据服务类型ID查询订单信息
     *
     * @param serviceId 服务类型ID
     * @return 订单信息列表
     */
    List<OrderDetailVo> selectOrderTypeByServiceId(@Param("serviceId") Long serviceId);


    /**
     * 添加订单
     */
    @Insert("INSERT INTO take_orders_info (user_id, employee_id, service_content, service_type, home_time, work_time, price_range_min, price_range_max, address_id, requirements, notes, order_no, status, user_requirement) " +
            "VALUES (#{userId}, #{employeeId}, #{serviceContent}, #{serviceType}, #{homeTime}, #{workTime}, #{priceRangeMin}, #{priceRangeMax}, #{addressId}, #{requirements}, #{notes}, #{orderNo}, #{status}, #{userRequirement})")
    int insertTakeOrdersInfo(TakeOrdersInfo takeOrdersInfo);


    /**
     * 查询服务技能
     */
//    List<TakeOrderSkills> selectSkillsByServiceId(@Param("serviceId") List<Long> serviceIds);
    List<TakeOrderSkills> selectSkillsByServiceId(@Param("serviceId") Long serviceId);
}
